package history.hot100.difficult;

import java.util.Arrays;

public class LeetCode_239 {
    public int[] maxSlidingWindow(int[] nums, int k) {
        if (nums == null || nums.length == 0 || k <=0 || k < nums.length) return new int[0];
        int length = nums.length;
        int []count = new int[length];
        for (int i = 0; i < k; i++) count[0] += nums[i];
        for (int i = k; i < length; i++) {
            int diff = nums[i] - nums[i-k];
            count[i-k+1] = count[i-k]+diff;
        }
        Arrays.sort(count);
        return null;
    }
}
